package com.wlk.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.wlk.mapper.UserRoleMapper;
import com.wlk.pojo.UserRole;
import com.wlk.service.UserRoleService;
import com.wlk.utils.Result;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Service
public class UserRoleServiceImpl extends ServiceImpl<UserRoleMapper, UserRole> implements UserRoleService {
    @Resource
    private UserRoleMapper userRoleMapper;
    @Override
    public Result addUserRole(UserRole userRole) {
        int i = userRoleMapper.insert(userRole);
        if (i > 0) {
            return Result.ok("添加成功");
        } else {
            return Result.fail("添加失败");

        }
    }

}
